<template>
    <fieldset>
        <legend>计时器</legend>
        <button>-</button>
        &nbsp;
        &nbsp;
        &nbsp;
        <b>{{num}}</b>
        &nbsp;
        &nbsp;
        &nbsp;
        <button>+</button>
        <h1>{{user}}</h1>
    </fieldset>
</template>

<script>
    import { mapState } from 'vuex'

    export default {
        mounted(){
            console.log(this.$store.state.user)
        },
        computed:{
            ...mapState(['num','user'])
        }
    }
</script>